package com.logicfishsoftware.plugbench.serializer;

import com.google.inject.Inject;
import com.logicfishsoftware.plugbench.services.WPPlugBenchGrammarAccess;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.IGrammarAccess;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.AlternativeAlias;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias;
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable;
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;

@SuppressWarnings("all")
public class WPPlugBenchSyntacticSequencer extends AbstractSyntacticSequencer {

	protected WPPlugBenchGrammarAccess grammarAccess;
	protected AbstractElementAlias match_BooleanOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_ChoiceFn_EqualsSignKeyword_1_0_q;
	protected AbstractElementAlias match_ChoiceOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_ColourOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_CustomOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_DateOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_DefaultOptionParam_EqualsSignKeyword_1_1_q;
	protected AbstractElementAlias match_DefaultOptionParam_EqualsSignKeyword_2_1_q;
	protected AbstractElementAlias match_DefaultOptionParam_EqualsSignKeyword_3_1_q;
	protected AbstractElementAlias match_FloatOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_Function___LeftCurlyBracketKeyword_3_0_RightCurlyBracketKeyword_3_2__q;
	protected AbstractElementAlias match_IntegerOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_OptionType_ColorKeyword_10_0_1_or_ColourKeyword_10_0_0;
	protected AbstractElementAlias match_RangeOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_SelectOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_StringOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_TextOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	protected AbstractElementAlias match_URLOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q;
	
	@Inject
	protected void init(IGrammarAccess access) {
		grammarAccess = (WPPlugBenchGrammarAccess) access;
		match_BooleanOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getBooleanOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getBooleanOptionAccess().getRightParenthesisKeyword_1_2()));
		match_ChoiceFn_EqualsSignKeyword_1_0_q = new TokenAlias(false, true, grammarAccess.getChoiceFnAccess().getEqualsSignKeyword_1_0());
		match_ChoiceOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getChoiceOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getChoiceOptionAccess().getRightParenthesisKeyword_1_2()));
		match_ColourOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getColourOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getColourOptionAccess().getRightParenthesisKeyword_1_2()));
		match_CustomOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getCustomOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getCustomOptionAccess().getRightParenthesisKeyword_1_2()));
		match_DateOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getDateOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getDateOptionAccess().getRightParenthesisKeyword_1_2()));
		match_DefaultOptionParam_EqualsSignKeyword_1_1_q = new TokenAlias(false, true, grammarAccess.getDefaultOptionParamAccess().getEqualsSignKeyword_1_1());
		match_DefaultOptionParam_EqualsSignKeyword_2_1_q = new TokenAlias(false, true, grammarAccess.getDefaultOptionParamAccess().getEqualsSignKeyword_2_1());
		match_DefaultOptionParam_EqualsSignKeyword_3_1_q = new TokenAlias(false, true, grammarAccess.getDefaultOptionParamAccess().getEqualsSignKeyword_3_1());
		match_FloatOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getFloatOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getFloatOptionAccess().getRightParenthesisKeyword_1_2()));
		match_Function___LeftCurlyBracketKeyword_3_0_RightCurlyBracketKeyword_3_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getFunctionAccess().getLeftCurlyBracketKeyword_3_0()), new TokenAlias(false, false, grammarAccess.getFunctionAccess().getRightCurlyBracketKeyword_3_2()));
		match_IntegerOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getIntegerOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getIntegerOptionAccess().getRightParenthesisKeyword_1_2()));
		match_OptionType_ColorKeyword_10_0_1_or_ColourKeyword_10_0_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getOptionTypeAccess().getColorKeyword_10_0_1()), new TokenAlias(false, false, grammarAccess.getOptionTypeAccess().getColourKeyword_10_0_0()));
		match_RangeOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getRangeOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getRangeOptionAccess().getRightParenthesisKeyword_1_2()));
		match_SelectOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getSelectOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getSelectOptionAccess().getRightParenthesisKeyword_1_2()));
		match_StringOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getStringOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getStringOptionAccess().getRightParenthesisKeyword_1_2()));
		match_TextOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getTextOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getTextOptionAccess().getRightParenthesisKeyword_1_2()));
		match_URLOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getURLOptionAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getURLOptionAccess().getRightParenthesisKeyword_1_2()));
	}
	
	@Override
	protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
		return "";
	}
	
	
	@Override
	protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
		if (transition.getAmbiguousSyntaxes().isEmpty()) return;
		List<INode> transitionNodes = collectNodes(fromNode, toNode);
		for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
			List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
			if(match_BooleanOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_BooleanOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_ChoiceFn_EqualsSignKeyword_1_0_q.equals(syntax))
				emit_ChoiceFn_EqualsSignKeyword_1_0_q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_ChoiceOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_ChoiceOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_ColourOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_ColourOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_CustomOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_CustomOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_DateOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_DateOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_DefaultOptionParam_EqualsSignKeyword_1_1_q.equals(syntax))
				emit_DefaultOptionParam_EqualsSignKeyword_1_1_q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_DefaultOptionParam_EqualsSignKeyword_2_1_q.equals(syntax))
				emit_DefaultOptionParam_EqualsSignKeyword_2_1_q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_DefaultOptionParam_EqualsSignKeyword_3_1_q.equals(syntax))
				emit_DefaultOptionParam_EqualsSignKeyword_3_1_q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_FloatOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_FloatOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_Function___LeftCurlyBracketKeyword_3_0_RightCurlyBracketKeyword_3_2__q.equals(syntax))
				emit_Function___LeftCurlyBracketKeyword_3_0_RightCurlyBracketKeyword_3_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_IntegerOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_IntegerOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_OptionType_ColorKeyword_10_0_1_or_ColourKeyword_10_0_0.equals(syntax))
				emit_OptionType_ColorKeyword_10_0_1_or_ColourKeyword_10_0_0(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_RangeOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_RangeOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_SelectOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_SelectOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_StringOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_StringOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_TextOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_TextOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if(match_URLOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax))
				emit_URLOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
			else acceptNodes(getLastNavigableState(), syntaxNodes);
		}
	}

	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_BooleanOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     '='?
	 */
	protected void emit_ChoiceFn_EqualsSignKeyword_1_0_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_ChoiceOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_ColourOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_CustomOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_DateOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     '='?
	 */
	protected void emit_DefaultOptionParam_EqualsSignKeyword_1_1_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     '='?
	 */
	protected void emit_DefaultOptionParam_EqualsSignKeyword_2_1_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     '='?
	 */
	protected void emit_DefaultOptionParam_EqualsSignKeyword_3_1_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_FloatOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('{' '}')?
	 */
	protected void emit_Function___LeftCurlyBracketKeyword_3_0_RightCurlyBracketKeyword_3_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_IntegerOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     'colour' | 'color'
	 */
	protected void emit_OptionType_ColorKeyword_10_0_1_or_ColourKeyword_10_0_0(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_RangeOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_SelectOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_StringOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_TextOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Syntax:
	 *     ('(' ')')?
	 */
	protected void emit_URLOption___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
}
